import request from '@/utils/request'

//导出默认模块
export default {
  //定义模块成员
  list() {
    //调用axios的初始化模块，发送ajax请求
    return request({
      url: '/seat/list',
      method: 'get',
    })
  },
  listFloors() {
    return request({
      url: '/floor/list',
      method: 'get',
    })
  },
  listReserveTime() {
    return request({
      url: '/reserveTime/list',
      method: 'get',
    })
  },
  save(form_value) {
    return request({
      url: '/seat/insert',
      method: 'post',
      data: form_value,
    })
  },
  saveFloor(form_floor) {
    return request({
      url: '/floor/insert',
      method: 'post',
      data: form_floor,
    })
  },
  saveReserveTime(form_floor) {
    return request({
      url: '/reserveTime/insert',
      method: 'post',
      data: form_floor,
    })
  },
  updateReserveState(seaId) {
    return request({
      url: `/seatState/updateReserveState/${seaId}`,
      method: 'get',
    })
  },
  generateQRCode() {
    //调用axios的初始化模块，发送ajax请求
    return request({
      url: '/seat/qrcode',
      method: 'get',
    })
  },
}
